home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / ip / ppp / dp-2.3 / h / slip_var.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-03-12  |  2.7 KB  |  74 lines

  1. /*
  2.  * Header file for SunOS 4.0 streams SLIP module
  3.  *
  4.  * Copyright 1988 by Rayan Zachariassen
  5.  *
  6.  * You may do anything with this file except put your own
  7.  * copyright on it or change or remove this copyright notice.
  8.  */
  9. /*
  10.  * Copyright (c) 1992 Purdue University
  11.  * All rights reserved.
  12.  *
  13.  * Redistribution and use in source and binary forms are permitted
  14.  * provided that the above copyright notice and this paragraph are
  15.  * duplicated in all such forms and that any documentation,
  16.  * advertising materials, and other materials related to such
  17.  * distribution and use acknowledge that the software was developed
  18.  * by Purdue University.  The name of the University may not be used
  19.  * to endorse or promote products derived * from this software without
  20.  * specific prior written permission.
  21.  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  22.  * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  23.  * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  24.  *
  25.  * Note: this copyright applies to portions of this software developed
  26.  * at Purdue beyond the software covered by the original copyright.
  27.  */
  28.  
  29. #ifndef    _sys_slip_h
  30. #define    _sys_slip_h
  31.  
  32. /*
  33.  * To compensate for lack of M_HANGUP on dialout lines, we use M_UNHANGUP
  34.  * as symptom of a possible carrier change, and generate a signal whenever
  35.  * an M_UNHANGUP passes by so the application can check for DCD.  This is
  36.  * a workaround that should go away when M_HANGUP is generated on dialouts.
  37.  */
  38.  
  39. #include <sys/signal.h>
  40.  
  41. /* signal to send application on stream device non-hangup DCD change */
  42. #define    SIGDCD        SIGUSR1
  43.  
  44.  
  45. #define    SLIPIFNAME    "slip"        /* base name of network interface */
  46.  
  47. #define    SLIOGUNIT    _IOR(t, 62, int)        /* get SLIP unit no. */
  48. #define    SLIOGSTATS    _IOR(t, 63, struct slipstat)    /* get statistics */
  49. #define    SLIOSFLAGS    _IOW(t, 64, int)        /* set flags */
  50.  
  51. struct slipstat {
  52.     u_int        sl_ibytes;    /* total number of data bytes in */
  53.     u_int        sl_ipackets;    /* total number of data packets in */
  54.     u_int        sl_ierrors;    /* total number of input errors */
  55.     u_int        sl_obytes;    /* total number of data bytes out */
  56.     u_int        sl_opackets;    /* total number of data packets out */
  57.     u_int        sl_oerrors;    /* total number of output errors */
  58. };
  59.  
  60. /* end of what the user-level process should care about */
  61.  
  62. /* See RFC1055 for the origin of the following magic numbers */
  63.  
  64. #define SLIPMAX        1006    /* this is the largest packet we'll accept */
  65. #define SLIPMTU        552    /* this is the largest packet we'll send
  66.                  * (the IP-level MTU) */
  67.  
  68. #define    END    0300        /* a frame just finished */
  69. #define    ESC    0333        /* introduces an escape sequence */
  70. #define    ESC_END    0334        /* the data contained an END */
  71. #define    ESC_ESC    0335        /* the data contained an ESC */
  72.  
  73. #endif    /* !_sys_slip_h */
  74.